<?php


/*
class Helper_Registrierung
{
    public function init()
    {
*/

	//}
	
	//http://192.168.1.139/sailorbase-a/sailorbase-a/library/Helper/Registrierung.php?funktion=telvorwahl&id=10
	function getlandvorwahl($id)
	{
		$db = @MYSQL_PCONNECT("localhost","root","sailorbasedb")
			or die ("Konnte keine Verbindung zur Datenbank herstellen");
		$db_check = @MYSQL_SELECT_DB("db*254525*1");
		$sql = "SELECT * FROM country Where id ='$id';";

		$db_erg = mysql_query($sql);
		while($daten = mysql_fetch_array($db_erg))
		{
			echo $daten['telvorwahl'];
		}
		mysql_free_result( $db_erg );
	
	}
		/*
		$db = Zend_Db_Table::getDefaultAdapter();
		$entry = new Zend_Db_Select($db);
		$entry->from('country');
		$entry->where('country.id = ?', $id);
		$country = $entry->query()->fetch();
		*/
		
		//echo $country['name'];
	
	
	
	switch ($_POST['funktion'])
	{
		case 'telvorwahl':
			getlandvorwahl($_POST['id']);
			break;
	
		default:
			break;
	}
	
//}
?>